#include <iostream>

using namespace std;

int func(int a, int b = 1, int c= 2);
int func2(int a, int b, int);
int func(int a,  int b, int c, int d);
int main() {

	cout << "func() is " << func(9) << endl;
	cout << "func() is " << func(9,3) << endl;
	cout << "func() is " << func(9,3,7) << endl;
	
	cout << "func2 is " << func2(1, 9, 3) << endl;
	cout << "4 params func is " << func(1, 9, 3, 17) << endl;
	return 0;
}

// 默认参数
int func(int a, int b, int c){
	return a + b + c;
}
// 函数重载
int func(int a,  int b, int c, int d){
	return a + b +c + d;
}

// 占位参数
int func2(int a, int b, int){
	return a + b ;
}